package bz.yfw.example.s3blazeds.part2.view
{
	import bz.yfw.example.s3blazeds.part2.model.view.EmpViewModel;
	import bz.yfw.example.s3blazeds.part2.view.state.EmpEditViewState;
	
	import spark.components.Button;
	import spark.components.TextArea;
	import spark.components.TextInput;
	import spark.components.View;
	
	/**
	 * 社員編集2View
	 * @author tokufxug http://twitter.com/tokufxug
	 */ 
	public class EmpEditSecondView extends View
	{
		[SkinPart]
		public var txtarAddress:TextArea;
		
		[SkinPart]
		public var txtinptTelL:TextInput;
		
		[SkinPart]
		public var txtinptTelC:TextInput;
		
		[SkinPart]
		public var txtinptTelR:TextInput;
		
		[SkinPart]
		public var txtinptEmailL:TextInput;
		
		[SkinPart]
		public var txtinptEmailR:TextInput;
		
		[SkinPart]
		public var btnNext:Button;
		
		[SkinPart]
		public var btnBack:Button;
		
		private var requiredCurrentState:String;
		
		private var _viewModel:EmpViewModel;
		
		public function EmpEditSecondView() {
			super.title = "編集画面2";
		}
		
		public override function createReturnObject():Object {
			return data;
		}
		
		public function get viewModel():EmpViewModel {
			return _viewModel;
		}
		
		public function set viewModel(value:EmpViewModel):void {
			_viewModel = value;
		}
		
		protected override function getCurrentSkinState():String{
			if (requiredCurrentState == null) {
				return EmpEditViewState.NORMAL_STATE;
			}
			return requiredCurrentState;
		}
	}
}